package com.xtm.exercise.base.A12threadDemo.ThreadSafe.test;

/**
 * 编写程序，完成模拟3个窗口共卖100张票的程序，并测试。
 * @author wanglei
 */
public class SellTicket {
	public static void main(String[] args) {
		//创建自定义类对象
		Ticket ticket = new Ticket();
		//创建线程对象
		Thread t1 = new Thread(ticket, "窗口1");
		Thread t2 = new Thread(ticket, "窗口2");
		Thread t3 = new Thread(ticket, "窗口3");
		//启动线程
		t1.start();
		t2.start();
		t3.start();
	}
}
